package org.filters;

import org.opencv.core.Mat;
import org.opencv.imgcodecs.Imgcodecs;
import org.opencv.imgproc.Imgproc;

public class Canny implements Filter{
    public void applyFilter(String imagePath){
        Mat src = Imgcodecs.imread(imagePath, Imgcodecs.IMREAD_GRAYSCALE);
        Mat edges = new Mat();
        Imgproc.Canny(src, edges, 100, 200);
        Imgcodecs.imwrite("output_canny.jpg", edges);
        System.out.println("Canny filter applied.");
    }
}
